home *** CD-ROM | disk | FTP | other *** search
- Path: chronicle.mti.sgi.com!austern
- From: tony@online.tmx.com.au (Tony Cook)
- Newsgroups: comp.std.c++
- Subject: Re: proposal: renew & relocator member fn
- Date: 20 Feb 1996 15:22:24 PST
- Organization: Home
- Approved: austern@isolde.mti.sgi.com
- Message-ID: <199602202319.KAA03283@online.tmx.com.au>
- References: <GNB.96Feb7140952@dame.bby.com.au> <4ffq10$7vb@bmtlh10.bnr.ca> <9602191213.AA01558@s7604030.ferndown.ate.slb.com>
- NNTP-Posting-Host: isolde.mti.sgi.com
- X-Original-Date: Wed, 21 Feb 1996 10:19:41 +1100
- X-Newsreader: TIN [version 1.2 PL2]
- X-Auth: PGPMoose V1.1 PGP comp.std.c++
- iQBVAwUBMSpXw0y4NqrwXLNJAQETWgH6An/o+de2Cx8OvdJI28Qd29z7Vguvb2OL
- 4oKbhi/9bBF6KDNMxKcIzqul1kBwv7yQf0dvnp3OmkMvGOMCNuJKHg==
- =cKj3
- Originator: austern@isolde.mti.sgi.com
-
- devitto@ferndown.ate.slb.com wrote:
- : On 10 Feb 96 08:35:39 GMT, john (j.d.) hickin (hickin@bnr.ca) wrote:
- : : |> Go ahead, shoot me down!
-
- : : POW!
-
- : I 'wrote' with Bjarne about a general 'renew' a couple of years ago. u
- : Basically the problem is that a general "resize this C array" routine is
- : difficult without virtual contructors, and virtual copy constructors
- : - otherwise the routine would need static type binding (templates).
-
- Urr...why?
-
- Doesn't using delete [] on a pointer with the wrong static type
- produce undefined behaviour anyway? ([expr.delete] stanza 3)
-
- Actually, if we had a memory allocator that split what realloc does
- into 'attempt to expand this block' and 'allocate a new block' then
- we can write renew ourselves. Unfortunately, at least some,
- operating systems, won't support this.
- --
- Tony Cook - tony@online.tmx.com.au
- 100237.3425@compuserve.com
- ---
- [ To submit articles: Try just posting with your newsreader. If that fails,
- use mailto:std-c++@ncar.ucar.edu
- FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html
- Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html
- Comments? mailto:std-c++-request@ncar.ucar.edu
- ]
-